# 作者: 家里蹲 吴越洋
# 2023年02月28日19时44分47秒

import queue


class Queue(object):
    def __init__(self):
        self.queue = [0, 0, 0, 0, 0, 0]
        self.rear = 0
        self.front = 0

    def enqueue(self, data):
        if (self.rear + 1) % 6 == self.front:
            return print("队列已满")
        self.queue[self.rear] = data
        self.rear += 1

    def dequeue(self):
        if self.rear == self.front:
            return print("队列为空")
        self.front = (self.front + 1) % 6
        return self.queue[self.front]


queue1 = Queue()
for i in range(5):
    queue1.enqueue(i)
